#!/usr/bin/env python
#coding:utf-8
import rospy
from yhy_pkg.msg import yhy_msg

def callback(data):
    rospy.loginfo("This message was received successfully via Python: %s is %f", data.sent, data.num)
    
def listener():
    rospy.init_node('listener', anonymous=True)
    rospy.Subscriber("chatter", yhy_msg, callback)
    rospy.spin()

if __name__ == '__main__':
    listener()
